package nuc.lizongze.backend.feign;

import nuc.lizongze.pojo.*;
import nuc.lizongze.utils.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Component
@FeignClient(value = "common-item")
public interface CommonItemFeignClient {
    // ------------/service/item
    @GetMapping("/service/item/selectTbItemAllByPage")
    PageResult selectTbItemAllByPage(@RequestParam("page")Integer page, @RequestParam("rows")Integer rows);

    // ---------------/service/itemCategory
    @GetMapping("/service/itemCategory/selectItemCategoryByParentId")
    public List<TbItemCat> selectItemCategoryByParentId(@RequestParam("id") Long id);

    // ------------/service/itemParam
    @GetMapping("/service/itemParam/selectItemParamByItemCatId")
    TbItemParam selectItemParamByItemCatId(@RequestParam("itemCatId") Long itemCatId);

    // ------------/service/item
    @GetMapping("/service/item/insertTbItem")
    Integer insertTbItem(@RequestBody TbItem tbItem);

    // ------------/service/itemDesc
    @GetMapping("/service/itemDesc/insertItemDesc")
    Integer insertItemDesc(@RequestBody TbItemDesc tbItemDesc);

    // ------------/service/itemParamItem
    @GetMapping("/service/itemParamItem/insertItemParamItem")
    Integer insertItemParamItem(@RequestBody TbItemParamItem tbItemParamItem);
}
